class Project < ActiveRecord::Base
  has_many :projectusers
  has_many :users ,:through => :projectusers,:order => "last_name ASC",:include => ["department"]	
	
  validates_presence_of :name, :on => :create, :message => "标题不能为空"
  validates_presence_of :owner, :on => :create, :message => "Owner can't be blank"
  validates_numericality_of :per_point, :on => :create, :message => "积分必须为整数",:allow_nil => false

  
end
